<div id="receipt_wrapper" style="background-color:#FFFFFF">
    <div id="receipt_header">
		<div id="company_name"><?php echo  $this->Html->image('smllogo.jpg', array('alt' => 'Pretty Little Treasures', 'border' => '0', 'width' => '230'));?></div>
		<div id="company_address">384 Centre Rd, Bentleigh VIC 3204</div>
        <div id="company_phone">Tel: (03) 9557 3388</div>
		<div id="sale_receipt"><strong>Consignment Receipt</strong></div>
		<div id="sale_time"><?php echo $this->Time->format("m/d/Y ",$consignment['Consignment']['date']);?></div>
	</div>
    <div id="employee">
         Consigner ID: <?php  echo $consignment['Consigner']['id'];?>
    </div>
	<div id="receipt_general_info">
		<div id="sale_id">
             Consigner Name: <?php echo $consignment['Consigner']['name'];?>
        </div>
	</div>
    <table id="receipt_items">
	    <tbody>
              <tr>
                  <th style="width:20%;text-align:left;">Item ID</th>
                  <th style="width:25%;text-align:left;">Item Name</th>
                  <th style="width:25%;text-align:left;">Date of Consignment</th>
                  <th style="width:25%;text-align:left;text-align:right">Price</th>
	          </tr>
				<?php foreach ($item as $items):?>
                  <tr style="border-bottom:2px #000 dashed; line-height:50px">
                      <td style="width:20%;"><?php echo $items['Item']['id']; ?></td>
                      <td style="width:25%;"><?php echo $items['Item']['name'];?></td>
                      <td style="width:25%;"><?php echo $this->Time->format("m/d/Y ",$consignment['Consignment']['date']);?></td>
                      <td style="width:25%;text-align:right"><?php echo $items['Item']['original_price'];?></td>
                  </tr>
              <?php  endforeach; ?>			  
              <tr><td></td></tr>
         </tbody>
     </table>
     
     <br />
     <div id="sale_return_policy">
        <h4>Pretty Little Treasures Consignment</h4>
        <h5>Pricing</h5>
            <p>A price range will be given to each item.  When an item is made available to sale in-store or online, it will be priced at the top-end of this price range.  After a period of six (6) weeks, the price of the item will be reduced to the lower-end of this price range.  If the item remains in-store for sale after 2 months, a further 20% will be deducted from the lowest price.</p>
        <br />
        <h5>Holding Consignment Stock</h5>
            <p>Pretty Little Treasures holds Consignment items for 2 months.  Where stock remains for sale after this time, it will be reduced in price.</p>
        <br />
        <h5>Collection of Unsold Goods</h5>
            <p>After 2 months, customers can arrange to collect their items and any monies outstanding for goods sold.  We ask that customers provide 7 days notice by telephone, allowing time for items to be removed from stock, audited and made available for collection.</p>
            <p>At the end of each season (March & September), Pretty Little Treasures will audit all stock and contact remaining customers to collect any stock and monies outstanding.  </p>
            <p>Pretty Little Treasures takes no responsibility for items left for six months or more.  These items will be donated to charity if they are not collected.</p>
        <br />
        <h5>Payment &#38; Reconciliation of goods</h5>
            <p>Sales are reconciled in-store on a weekly basis, and Consignment customers can contact Pretty Little Treasures at any time by telephone to receive an update of their sales. All payments are made at the conclusion of the Consignment arrangement (ie. at the time items are collected) and will be paid by cheque.
               Consignment Customers will be paid a percentage of the sale price for all goods sold on their behalf as follows&#58;</p>
               <ul>
                <li>International Luxury Brands- 50% of the sale price</li>
                <li>All other items &#45; 40&#37; of the sale price</li>
               </ul>
    </div>
	<button class="submit_button btn" id="print_button" onclick="printDiv('main')"> Print </button>
</div>

<script type="text/javascript">
function printDiv(divName) {
	$('#print_button').hide();
     var printContents = document.getElementById(divName).innerHTML;
     var originalContents = document.body.innerHTML;

     document.body.innerHTML = printContents;

     window.print();

     document.body.innerHTML = originalContents;
}

/*	function print_receipt()
	{
		alert($('#receipt_items'));
		$('#print_button').hide();
		$('#receipt_items').print();
	}
*/</script>